package com.kotasoft.training.roogwteclipselink.shared.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotNull;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity
public class Matricula {

    @NotNull
    private String carrera;

    @NotNull
    private Integer numero;

    @NotNull
    @OneToOne
    private Alumno alumno;

    @NotNull
    @OneToMany
    private Set<Asignatura> asignaturas = new HashSet<Asignatura>();

    @NotNull
    private String curso;
}
